Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IdleRegister to deal with destruction while idle func is queued #3677

Merged
merged 2 commits into from Feb 13, 2017

Conversation

Floessie
Copy link
Collaborator

@Floessie Floessie commented Feb 9, 2017

This adds a little helper class to guiutils.* that unregisters
in-flight idle functions queued by IdleRegister::add(). It's best
to call IdleRegister::destroy() in the destructor of the class
owning the IdleRegister instance. Otherwise make sure, it is the
last member which will be deleted first.

Resize now makes use of this new facility in setDimensions(), which
also fixes #3673.

This adds a little helper class to `guiutils.*` that unregisters
in-flight idle functions queued by `IdleRegister::add()`. It's best
to call `IdleRegister::destroy()` in the destructor of the class
owning the `IdleRegister` instance. Otherwise make sure, it is the
last member which will be deleted first.

`Resize` now makes use of this new facility in `setDimensions()`, which
also fixes #3673.
@Floessie
Copy link
Collaborator Author

@Hombre57 @heckflosse @Beep6581 That's it for this PR. Please test. Replacing gdk_threads(enter|leave)() in other places shouldn't be part of this PR, as #3673 needs to be fixed soon.

@Hombre57
Copy link
Collaborator

@Floessie Very nice work ! But do you have some recommendations on how to test this branch ?

@Beep6581
Copy link
Owner

Beep6581 commented Feb 12, 2017

@Floessie I locally merged dev into idle_register and tested, found no issues.

@Floessie Floessie merged commit 6b6c080 into dev Feb 13, 2017
@Floessie Floessie deleted the idle_register branch February 13, 2017 15:24
@harshula
Copy link
Contributor

@Floessie Thanks for fixing the crash so quickly! I tested a build with your patch. No crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rawtherapee: crash when F4 is pressed to move to the next image
4 participants